﻿$(document).ready(
            function () {
                var orginalwidth = $(this).;
                var orginalheight = $(this).height;
                $('#Container img').mouseenter(  
                    function (event) {
                        var scale = 150 / 100;
                        var pos = $(this).offset();
                        var clickX = event.pageX - pos.left;
                        var clickY = event.pageY - pos.top;
                        var container = $(this).parent().get(0);

                        $(this).css({
                            width: this.width * scale,
                            height: this.height * scale
                        });

                        container.scrollLeft = ($(container).width() / -2) + clickX * scale;
                        container.scrollTop = ($(container).height() / -2) + clickY * scale;
                    }
                );

                $('#Container img').mouseleave(
                    function (event) {
                        $(this).css({ width: orginalwidth, height: orginalheight});
                    }
                );
            }
        );